package com.bianguo.android.functiondemo.view.activity;

import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;

import com.bianguo.android.functiondemo.R;
import com.bianguo.android.functiondemo.utils.MLog;

import butterknife.OnClick;

public class TouchActivity extends BaseActivity {

    @Override
    public int layoutId() {
        return R.layout.activity_touch;
    }

    @Override
    public void initView(@Nullable Bundle savedInstanceState) {

    }

    @OnClick({R.id.touch_view})
    public void onClickBk(View view) {
        switch (view.getId()) {
            case R.id.touch_view:
                MLog.mLog("onClick");
                break;
        }
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        MLog.mLog("+++++++++ dispatchTouchEvent +++++++++");
        return super.dispatchTouchEvent(ev);
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        MLog.mLog("+++++++++ onTouchEvent +++++++++");
        return super.onTouchEvent(event);
    }
}
